<{include file="default/header.html"}>
<div class="main">
	<div class="contents">
		<div class="top">博客挂件</div>
		<h2>设置博客挂件</h2>
		<h3>请按需要调整博客挂件参数</h3>
		<div class="entry">
			<div class="box">
			<form action="" method="">
				<p class="formitem"><span>长度：</span><input type="text" name="width" class="input" maxlength='3' value="300" id="codewidth" />px</p>
				<p class="formitem"><span>宽度：</span><input type="text" name="height" class="input" maxlength='3' value="150" id="codeheight"  />px</p>
				<div class="formhr"></div>
				<p class="formsubmit"><input type="button" value=" 生成代码 " onclick="createcode();"></p>
			</form>
			</div>
		</div>
<script language=javascript>		
function createcode(){
	w = id("codewidth").value;if(w.length < 2){alert("宽度太小，请修改！");return false;}
	h = id("codeheight").value;if(h.length < 2){alert("高度太小，请修改！");return false;}
	url = "http://<{$widget_url}>uid=<{$site_user.uid}>&width=" + w + "&height=" + h;
	code = '<iframe id="winblog_widget" style="width:' + w + 'px; height:' + h + 'px;" frameborder="0" scrolling="no" src="' + url + '">';
	id('mywii').value = code;
}
</script>
		<div class="clear"></div>
		<h2>挂件代码</h2>
		<h3>请复制下面的代码到你的博客上</h3>
		<div class="entry">
			<div class="box">
				<textarea name="mywii" class="mywii" id="mywii"></textarea>
			</div>
		</div>
	</div>
	<{$template_sidebar}>
	<div class="clear"></div>
</div>
<{include file="default/footer.html"}>